﻿<%@ Page Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true"
    CodeFile="AddNewCarModel.aspx.cs" Inherits="Admin_car_insurance_AddNewCarModel"
    Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="contents">
        <table width="100%" cellpadding="3" cellspacing="0" border="0">
            <tr>
                <td colspan="2">
                    <h1>Add New Car Model</h1>
                    <asp:Label ID="lblCarMakeId" runat="server" Visible="false"></asp:Label>
                    <asp:Label ID="lblCarModelId" runat="server" Visible="false"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="width: 30%"; valign="top">
                    Car Make
                </td>
                <td>
                    <asp:DropDownList ID="ddlCarMake" runat="server" OnSelectedIndexChanged="ddlCarMake_SelectedIndexChanged">
                        <asp:ListItem Selected="True" Value="-1">Select</asp:ListItem>
                        <asp:ListItem Value="1">B.M.W</asp:ListItem>
                        <asp:ListItem Value="2">Toyota</asp:ListItem>
                        <asp:ListItem Value="3">Nissan</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;<asp:RequiredFieldValidator ID="rfvCarMake" runat="server" ControlToValidate="ddlCarMake"
                        ErrorMessage="Choose Car Make" InitialValue="-1" ValidationGroup="cardetail">Choose</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Car Model
                </td>
                <td>
                    <asp:TextBox ID="txtCarModel" runat="server" Width="200px" Enabled="False"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvCarModel" runat="server" ControlToValidate="txtCarModel"
                        ErrorMessage="Require Car Model" EnableClientScript="False"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Car Code
                </td>
                <td>
                    <asp:TextBox ID="txtCarCode" runat="server"></asp:TextBox>
                    eg. AUDI0001A
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtCarCode"
                        ErrorMessage="Require Car Code"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Description
                </td>
                <td>
                    <asp:TextBox ID="txtDescription" runat="server" MaxLength="100" Width="300px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtDescription"
                        ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Body
                </td>
                <td>
                    <asp:TextBox ID="txtBody" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtBody"
                        ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    CC
                </td>
                <td>
                    <asp:TextBox ID="txtCC" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtCC"
                        ErrorMessage="RequiredFieldValidator"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Status
                </td>
                <td>
                    <asp:CheckBox ID="chkCarModelStatus" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" Text="Submit"
                        ValidationGroup="carmake" CssClass="btn blue" />
                    <asp:Button ID="btnClearForm" runat="server" CausesValidation="False" OnClick="btnClearForm_Click"
                        OnClientClick="return confirm('Are you sure to clear form?');" Text="Clear" CssClass="btn blue" />
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <asp:Label ID="lblMessage" runat="server" ForeColor="Green" Font-Bold="true"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
